package com.bjb.vr.schedule.task;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @version 1.0.0
 * @author: HuJingBo
 * @time: 2022/4/2 14:26
 */
@Slf4j
@Component
public class SampleXxlJob {


    /**
     * 定时任务示例
     *
     * @throws Exception
     */
    @XxlJob(value = "demoJobHandler")
    public void execute() throws Exception {
        String jobParam = XxlJobHelper.getJobParam();
        log.info("{} 我们不能失去信仰", jobParam);
    }

}
